//
//  DataHandel.h
//  Days
//
//  Created by lanou3g on 16/1/6.
//  Copyright © 2016年 dss. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>


typedef void(^GETBLOCK)(id object);

//声明逆地理编码block
typedef void(^unGeographyCodingBlock)(NSString *address);

//回调位置信息的block
typedef void(^LOCATIONBLOCK)(CLLocationCoordinate2D coor);

@interface DataHandel : NSObject

@property(nonatomic,strong)LOCATIONBLOCK updateBlock;

+(instancetype)sharedHandel;

//根据网址得到数据的方法
-(void)getDataWithURL:(NSString *)url withBlock:(GETBLOCK) block;



//开始定位
-(void)startLocation;
#pragma mark -- 逆地理编码(根据经纬度获取地址)
-(void)getAddressWithCoordinate:(CLLocationCoordinate2D )coordinate withFinish:(unGeographyCodingBlock)finishBlock;

@end
